// EG4ParaManager.h -- an interface to ROOT for filling the generate
// sim data in a tree, and storing it in a root file
// Created: Oct. 11, 2024 by Asia SUN
// Last modified: Oct. 11, 2024 by Asia SUN

#ifndef EG4ParaManager_h
#define EG4ParaManager_h

#include <yaml-cpp/yaml.h>

using YAML::Node;
using std::string;

class EG4ParaManager{
public:
  static EG4ParaManager *Instance();
  virtual ~EG4ParaManager();

  virtual void ReadParameters(const string &ctrl = "");
  const Node &DetPosPara() const{ return fDetPosConfig; }
  const Node &CtrlPara() const{ return fCtrlConfig; }

private:
  EG4ParaManager();
  static EG4ParaManager *fInstance;

protected:
  string fCtrlYaml; // the yaml file controlling control info
  Node fDetPosConfig;
  Node fCtrlConfig;
};

#endif
